<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditAgencyTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditAgencyLabel_agencyId}" for="agencyId" />
                    <h:inputText id="agencyId" value="#{agencyController.selected.agencyId}" title="#{bundle.EditAgencyTitle_agencyId}" required="true" requiredMessage="#{bundle.EditAgencyRequiredMessage_agencyId}"/>
                    <h:outputLabel value="#{bundle.EditAgencyLabel_agencyName}" for="agencyName" />
                    <h:inputText id="agencyName" value="#{agencyController.selected.agencyName}" title="#{bundle.EditAgencyTitle_agencyName}" required="true" requiredMessage="#{bundle.EditAgencyRequiredMessage_agencyName}"/>
                    <h:outputLabel value="#{bundle.EditAgencyLabel_agencyUrl}" for="agencyUrl" />
                    <h:inputText id="agencyUrl" value="#{agencyController.selected.agencyUrl}" title="#{bundle.EditAgencyTitle_agencyUrl}" required="true" requiredMessage="#{bundle.EditAgencyRequiredMessage_agencyUrl}"/>
                    <h:outputLabel value="#{bundle.EditAgencyLabel_agencyTimezone}" for="agencyTimezone" />
                    <h:inputText id="agencyTimezone" value="#{agencyController.selected.agencyTimezone}" title="#{bundle.EditAgencyTitle_agencyTimezone}" required="true" requiredMessage="#{bundle.EditAgencyRequiredMessage_agencyTimezone}"/>
                    <h:outputLabel value="#{bundle.EditAgencyLabel_agencyLang}" for="agencyLang" />
                    <h:inputText id="agencyLang" value="#{agencyController.selected.agencyLang}" title="#{bundle.EditAgencyTitle_agencyLang}" />
                    <h:outputLabel value="#{bundle.EditAgencyLabel_agencyPhone}" for="agencyPhone" />
                    <h:inputText id="agencyPhone" value="#{agencyController.selected.agencyPhone}" title="#{bundle.EditAgencyTitle_agencyPhone}" />
                </h:panelGrid>
                <h:commandLink action="#{agencyController.update}" value="#{bundle.EditAgencySaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditAgencyViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{agencyController.prepareList}" value="#{bundle.EditAgencyShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditAgencyIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
